<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/27
 * Time: 11:01
 */

namespace app\models;

use yii\db\Query;
use yii;

class EmailModel
{
    public $table;

    public function __construct()
    {
        $this->table = yii::$app->db->tablePrefix.'email';
    }

    public function all()
    {
        $db = new Query();
        return $db->select('*')->from($this->table)->all();
    }
}